//
/***********************************************************
             File name:      main.c
             Author:         Bitat (陆叁柒)
             Email :         Bitat@qq.com
             Gitee :         https://gitee.com/bitat
             CSDN  :         https://blog.csdn.net/bitat
             History:        2023/1/12
 ************************************************************/

//100-200之间的素数
#include <math.h>
#include <stdio.h>


int is_prime(int i)
{
    int j = 0;

    for (j = 2; j <= sqrt(i); j++)
    {
        if (i % j == 0)
        {
            return 0;
        }
    }

    return 1;
}

int main()
{
    int i = 0;
    int count = 0;

    for (i = 101; i < 200; i++)
    {
        if (is_prime(i) == 1)
        {
            printf("%d ", i);
            count++;
        }
    }

    printf("\ncount=%d\n", count);
    return 0;
}
